package com.wang.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @Author 19225
 * @create 2020/12/1 18:46
 */
//等价于<bean id="user" class="com.wang.entity.User"/>
    //componet 组件
@Component
@Scope("singleton")

public class User {

    private String name;

    public String getName() {
        return name;
    }

    @Value("taotao")
    public void setName(String name) {
        this.name = name;
    }
}
